package com.feinno.urcs.group.entity;

import com.feinno.superpojo.SuperPojo;
import com.feinno.superpojo.annotation.Field;
import com.feinno.urcs.group.siptask.task.TagGenerator;
import com.feinno.urcs.types.MobileNo;
import org.helium.framework.task.DedicatedTaskArgs;

/**
 * 一个常用的请求参数封装, 包含URI(请求发起UE, 目标UE,群),ConversationID
 *
 * @author Li.Hongbo <lihongbo@feinno.com>
 */
public class GroupCommonArgs extends SuperPojo implements DedicatedTaskArgs {
    /**
     * 发起者uri
     */
    @Field(id = 1)
    private MobileNo fromMobileNo;
    /**
     * groupUri
     */
    @Field(id = 2)
    private GroupIndex groupIndex;
    /**
     * conversationID
     */
    @Field(id = 3)
    private String conversationId;
    /**
     * 目标方URI
     */
    private MobileNo referToMobileNo;

    public GroupCommonArgs() {
    }

    /**
     * @param fromMobileNo
     * @param groupIndex
     * @param conversationId
     * @param fromMobileNo
     */
    public GroupCommonArgs(MobileNo fromMobileNo, GroupIndex groupIndex, String conversationId, MobileNo referToMobileNo) {
        this.fromMobileNo = fromMobileNo;
        this.groupIndex = groupIndex;
        this.conversationId = conversationId;
        this.referToMobileNo = referToMobileNo;
    }



    public String getConversationId() {
        return conversationId;
    }

    public void setConversationId(String conversationId) {
        this.conversationId = conversationId;
    }



    public MobileNo getFromMobileNo() {
        return fromMobileNo;
    }

    public void setFromMobileNo(MobileNo fromMobileNo) {
        this.fromMobileNo = fromMobileNo;
    }

    public MobileNo getReferToMobileNo() {
        return referToMobileNo;
    }

    public void setReferToMobileNo(MobileNo referToMobileNo) {
        this.referToMobileNo = referToMobileNo;
    }

    public GroupIndex getGroupIndex() {
        return groupIndex;
    }

    public void setGroupIndex(GroupIndex groupIndex) {
        this.groupIndex = groupIndex;
    }


    @Override
    public Object getTag() {
        return TagGenerator.generateTaskTag(referToMobileNo,groupIndex.getGroupId());
    }
}
